<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>Test</title>
</head>
<body>
<div id="ids">thymeleaf</div>
<span>
判断map中是否包含某个值:
</span>
<div style="color: red" th:text="${map!=null?(#maps.containsKey(map,'name')?map.name:''):''}"></div>
<br>
<span>th:text="${isNull}"获取值</span>
<div th:text="${isNull}">字符串为空</div>
<br>
<span>内置对象</span>
<div th:text="${#numbers.formatDecimal(num,3,2)}">金额</div>
<br>
<h1>测试[a[$c{name}]]</h1>
<!-- 单引号 和域中的值 -->
<p>
[[${name}]]
</p>
<br/>
<a th:href="'javascript:a(\''+${name}+'\')'">点击|JS中传递域中的函数|测试</a>
<br>
<p th:text="${hello}">默认值</p>
<h4>判断</h4>
<p th:if="1==2">我是存在的</p>
<br>
<input th:checked="(${isNull})" type="checkbox">

<!-- 取值 -->
<p th:text="${name}">name默认值</p>
<br>
<h4>循环</h4>
<p th:each="str: ${list} " th:text="${str}"></p>

<p th:each="str:${list}">
  <input th:value="${str}" type="text">
<div th:text="${str}"></div>
</p>
<h3>包含</h3>
<!-- :: 左边的值拼接能够找到要包含的文件 -->
<!-- :: 右边的值拼接 代码片段的名字 -->
<div th:insert="~{include/part ::first }"></div>
</body>
</html>